package IO.字节流;

import java.io.*;
import java.util.Arrays;

public class BytesStream {
    public static void main(String[] args) throws IOException {
        File fileToInput = new File("D:/IOFile/test/泰妍.jpg");
        File fileToOutput = new File("D:/IOFile/test/a/taiyan.jpg");

        FileInputStream fis = new FileInputStream(fileToInput);
        FileOutputStream fos = new FileOutputStream(fileToOutput);

        byte[] bytes = new byte[1024];
        int len = -1;
        if (((len = fis.read(bytes)) != -1)){
            System.out.println(bytes);
            System.out.println(Arrays.toString(bytes));
            fos.write(bytes,0,bytes.length);
        }
        fis.close();
        fos.close();






    }
}
